package com.grades.springboot.controller;


import com.grades.springboot.entity.Result;
import com.grades.springboot.service.impl.ValidationServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/validation")
public class ValidationController {

    @Autowired
    private ValidationServiceImpl validationService;

    /**
     * 用户信息获取
     * @param email 用户邮箱
     * @return 返回一个Result对象，其中封装了邮箱发送的结果
     */
    @PutMapping("/")
    public Result<?> sendValidation(String email) {
        return validationService.sendValidation(email);
    }
}
